﻿IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_permit]') AND TYPE in (N'U'))
BEGIN
CREATE TABLE tb_permit
(
    Id INT IDENTITY(1,1) NOT NULL,
    permitcode varchar(20) not null,
	ModuleCode varchar(4) not null,
	ActionCode varchar(10) not null,
	PermitValue varchar(40) not null,
    CreateBy VARCHAR(100),
    CreateDate DATETIME DEFAULT(GETDATE()),
    UpdateBy VARCHAR(100),
    UpdateDate DATETIME,
	CONSTRAINT PK_permit_Id PRIMARY KEY CLUSTERED (Id)
) 
END
GO